const ifElse = <T>(condition: boolean, positive: T, negative: T) => condition ? positive : negative;

const score = 61;
const credit = ifElse(score >= 60, "及格", "不及格")